import datetime

LOGFILE = ".log"
LOGDIR = "logging"

def log(message):
    prefix = str(datetime.datetime.now().year) + str(datetime.datetime.now().month) + str(datetime.datetime.now().day)
    log_file = open(LOGDIR + "\\" + prefix + LOGFILE, "a")
    log_file.write("[" + str(datetime.datetime.now()) + "] " + message)
    log_file.write("\n")
    log_file.close()
